package cn.jieruoda.eb.system.domain.entity;

import java.io.Serializable;
import java.util.Date;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

import lombok.Data;

/**
 * 系统菜单表
 */
@Data
@Entity
@Table(name = "system_menu")
public class SystemMenu implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 菜单ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    
    /**
     * 父级ID
     */
    @Column(name = "pid", nullable = false)
    private Integer pid;
    
    /**
     * 名称
     */
    @Column(name = "name")
    private String name;
    
    /**
     * icon
     */
    @Column(name = "icon")
    private String icon;
    
    /**
     * 权限标识
     */
    @Column(name = "perms")
    private String perms;
    
    /**
     * 组件路径
     */
    @Column(name = "component")
    private String component;
    
    /**
     * 类型，M-目录，C-菜单，A-按钮
     */
    @Column(name = "type", length = 2)
    private String type;
    
    /**
     * 排序
     */
    @Column(name = "sort", nullable = false)
    private Integer sort;
    
    /**
     * 1 可显示
     */
    @Column(name = "status", nullable = false)
    private Integer status;

    /**
     * 创建时间
     */
    @Column(name = "create_time", nullable = false)
    private Date createTime;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time", nullable = false)
    private Date updateTime;
} 